import request from '@/utils/request'
/**
 * @param { Object } params
 * @return { Promise }
 * @description 获取课程详情
 */
export const apiCourseDetail = (params: any) => request.get({ url: '/course/detail', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 获取课程目录
 */
export const apiCourseCatalogue = (params: any) =>
    request.get({ url: '/course/catalogue/detail', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 获取商品评价列表
 */
export const apiEvaluateGoodsLists = (params: any) =>
    request.get({ url: '/course/comment/list', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 获取商品评价分类列表
 */
export const apiEvaluateGoodsCategory = (params: any) =>
    request.get({ url: '/goods_comment/commentCategory', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 免费加入课程
 */
export const apiCourseStudy = (params: any) =>
    request.post({ url: '/course/study/add', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 完成目录学习
 */
export const apiCompletedStudy = (params: any) =>
    request.post({ url: '/course/catalogue/study/completed', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 获取课程资料
 */
export const apiGetMeterial = (params: any) =>
    request.get({ url: '/course/material/detail', data: params })

/**
 * @param { Object } params
 * @return { Promise }
 * @description 更新学习时长
 */
export const apiUpDateStudy = (params: any) =>
    request.post({ url: '/course/catalogue/study/schedule/update', data: params })
